﻿using System;
using System.Collections.Generic;
using System.Text;


using Microsoft.Practices.EnterpriseLibrary.Validation.Validators;
using DevExpress.Xpo;
using DevExpress.Xpo.Metadata;
using OT.Module.ModelConst;
using OT.Common;
using OT.EntLib.Validate;

namespace OT.Module.Model
{
	
    [Persistent(GDB.Org_Company)]
	public class Org_Company : XPLiteObject
	{
        #region ~

        public Org_Company() : base ( new Session() )
        {

        }

        public Org_Company(Session s)
            : base(s)
        {
        }

        public Org_Company(Session s, XPClassInfo info)
            : base(s, info)
        {
        }

        #endregion
        
        
		#region ID  标识
		private string _ID = "";	
		
		[Key(false)]
		
		public string ID
		{
			get
			{
				return _ID;
			}
			set
			{
				SetPropertyValue("ID", ref _ID, value);
			}
		}
		#endregion
	
	
		#region Org_Companys  
		[Association("Org_Company-Org_Companys", typeof(Org_Company))]
        public XPCollection<Org_Company> SubCompanys { get { return GetCollection<Org_Company>("Org_Companys"); } }
		#endregion
	
	
		#region Org_Departments  
		[Association("Org_Company-Org_Departments", typeof(Org_Department))]
        public XPCollection<Org_Department> Departments { get { return GetCollection<Org_Department>("Org_Departments"); } }
		#endregion
	
	
		#region Org_Employees  
		[Association("Org_Company-Org_Employees", typeof(Org_Employee))]
        public XPCollection<Org_Employee> Employees { get { return GetCollection<Org_Employee>("Org_Employees"); } }
		#endregion

	
		#region PID  父标识
        private Org_Company _PID;

        [Association("Org_Company-Org_Companys")]
        [Persistent("PID")]
        public Org_Company ParentCompany
        {
            get
            {
                return _PID;
            }
            set
            {
                SetPropertyValue("ParentCompany", ref _PID, value);
            }
        }
		#endregion
	
	
		#region CompCode  公司编码
		private string _CompCode = "";	
		[DisplayName(GSyntax.Org_Company.CompCode), Size(50)]
		public string CompCode
		{
			get
			{
				return _CompCode;
			}
			set
			{
				SetPropertyValue("CompCode", ref _CompCode, value);
			}
		}
		#endregion
	
	
		#region CompShortName  公司简称
		private string _CompShortName = "";	
		[DisplayName(GSyntax.Org_Company.CompShortName), Size(100)]
		public string CompShortName
		{
			get
			{
				return _CompShortName;
			}
			set
			{
				SetPropertyValue("CompShortName", ref _CompShortName, value);
			}
		}
		#endregion
	
	
		#region CompName  公司全称(英文)
		private string _CompName = "";	
		[DisplayName(GSyntax.Org_Company.CompName), Size(100)]
		public string CompName
		{
			get
			{
				return _CompName;
			}
			set
			{
				SetPropertyValue("CompName", ref _CompName, value);
			}
		}
		#endregion
	
	
		#region CompType  公司类别
		private string _CompType = "";	
		[DisplayName(GSyntax.Org_Company.CompType), Size(14)]
		public string CompType
		{
			get
			{
				return _CompType;
			}
			set
			{
				SetPropertyValue("CompType", ref _CompType, value);
			}
		}
		#endregion
	
	
		#region Address  地址
		private string _Address = "";	
		[DisplayName(GSyntax.Org_Company.Address), Size(200)]
		public string Address
		{
			get
			{
				return _Address;
			}
			set
			{
				SetPropertyValue("Address", ref _Address, value);
			}
		}
		#endregion
	
	
		#region PostalCode  邮政编码
		private string _PostalCode = "";	
		[DisplayName(GSyntax.Org_Company.PostalCode), Size(10)]
		public string PostalCode
		{
			get
			{
				return _PostalCode;
			}
			set
			{
				SetPropertyValue("PostalCode", ref _PostalCode, value);
			}
		}
		#endregion
	
	
		#region Telephone  联系电话
		private string _Telephone = "";	
		[DisplayName(GSyntax.Org_Company.Telephone), Size(18)]
		public string Telephone
		{
			get
			{
				return _Telephone;
			}
			set
			{
				SetPropertyValue("Telephone", ref _Telephone, value);
			}
		}
		#endregion
	
	
		#region Fax  传真
		private string _Fax = "";	
		[DisplayName(GSyntax.Org_Company.Fax), Size(18)]
		public string Fax
		{
			get
			{
				return _Fax;
			}
			set
			{
				SetPropertyValue("Fax", ref _Fax, value);
			}
		}
		#endregion
	
	
		#region LinkMan  联系人
		private string _LinkMan = "";	
		[DisplayName(GSyntax.Org_Company.LinkMan), Size(40)]
		public string LinkMan
		{
			get
			{
				return _LinkMan;
			}
			set
			{
				SetPropertyValue("LinkMan", ref _LinkMan, value);
			}
		}
		#endregion
	
	
		#region CompGrade  资质等级
		private string _CompGrade = "";	
		[DisplayName(GSyntax.Org_Company.CompGrade), Size(14)]
		public string CompGrade
		{
			get
			{
				return _CompGrade;
			}
			set
			{
				SetPropertyValue("CompGrade", ref _CompGrade, value);
			}
		}
		#endregion
	
	
		#region CompCertificate  资质证书号
		private string _CompCertificate = "";	
		[DisplayName(GSyntax.Org_Company.CompCertificate), Size(50)]
		public string CompCertificate
		{
			get
			{
				return _CompCertificate;
			}
			set
			{
				SetPropertyValue("CompCertificate", ref _CompCertificate, value);
			}
		}
		#endregion
	
	
		#region ShopCard  营业执照号码
		private string _ShopCard = "";	
		[DisplayName(GSyntax.Org_Company.ShopCard), Size(50)]
		public string ShopCard
		{
			get
			{
				return _ShopCard;
			}
			set
			{
				SetPropertyValue("ShopCard", ref _ShopCard, value);
			}
		}
		#endregion
	
	
		#region VocaWork  主要业务
		private string _VocaWork = "";	
		[DisplayName(GSyntax.Org_Company.VocaWork), Size(500)]
		public string VocaWork
		{
			get
			{
				return _VocaWork;
			}
			set
			{
				SetPropertyValue("VocaWork", ref _VocaWork, value);
			}
		}
		#endregion
	
	
		#region EstaDate  成立日期
		private string _EstaDate = "";	
		[DisplayName(GSyntax.Org_Company.EstaDate), Size(8)]
		public string EstaDate
		{
			get
			{
				return _EstaDate;
			}
			set
			{
				SetPropertyValue("EstaDate", ref _EstaDate, value);
			}
		}
		#endregion
	
	
		#region IsComp  是否为公司,否则为公司分类
		private string _IsComp = "";	
		[DisplayName(GSyntax.Org_Company.IsComp), Size(14)]
		public string IsComp
		{
			get
			{
				return _IsComp;
			}
			set
			{
				SetPropertyValue("IsComp", ref _IsComp, value);
			}
		}
		#endregion
	
	
		#region ProjectID  项目标识
		private string _ProjectID = "";	
		[DisplayName(GSyntax.Org_Company.ProjectID), Size(36)]
		public string ProjectID
		{
			get
			{
				return _ProjectID;
			}
			set
			{
				SetPropertyValue("ProjectID", ref _ProjectID, value);
			}
		}
		#endregion
	
	
		#region Remark  描述
		private string _Remark = "";	
		[DisplayName(GSyntax.Org_Company.Remark), Size(500)]
		public string Remark
		{
			get
			{
				return _Remark;
			}
			set
			{
				SetPropertyValue("Remark", ref _Remark, value);
			}
		}
		#endregion
	
	
		#region Status  初始\确认\作废
		private string _Status = "";	
		[DisplayName(GSyntax.Org_Company.Status), Size(14)]
		public string Status
		{
			get
			{
				return _Status;
			}
			set
			{
				SetPropertyValue("Status", ref _Status, value);
			}
		}
		#endregion
	
	
		#region Serial  排序号
		private string _Serial = "";	
		[DisplayName(GSyntax.Org_Company.Serial), Size(4)]
		public string Serial
		{
			get
			{
				return _Serial;
			}
			set
			{
				SetPropertyValue("Serial", ref _Serial, value);
			}
		}
		#endregion
	
	
		#region CompSerial  排序
		private string _CompSerial = "";	
		[DisplayName(GSyntax.Org_Company.CompSerial), Size(4)]
		public string CompSerial
		{
			get
			{
				return _CompSerial;
			}
			set
			{
				SetPropertyValue("CompSerial", ref _CompSerial, value);
			}
		}
		#endregion
	
	
		#region CompStyle  单位类型
   
		private string _CompStyle = "";	
        /// <summary>
        /// 业主单位 1101801
        /// 施工单位 1101802
        /// 监理单位 1101803
        /// 其它 1101804
        /// </summary>
		[DisplayName(GSyntax.Org_Company.CompStyle), Size(14)]
		public string CompStyle
		{
			get
			{
				return _CompStyle;
			}
			set
			{
				SetPropertyValue("CompStyle", ref _CompStyle, value);
			}
		}
		#endregion
	
	
    }
	
}
	